/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.expert.entity;

import com.chlitina.store.common.persistence.BaseEntity;

/**
 * 客户采纳方案与产品复合主键
 * @author lvbo
 * @version 2013-06-20
 */
public class CustomerSolutionMixPK extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	private CustomerSolution customerSolution;//客户采纳方案
	private SolutionFaceProductMix solutionFaceProductMix; 	// 方案产品组合

	public CustomerSolutionMixPK() {
	}

	public CustomerSolution getCustomerSolution() {
		return customerSolution;
	}

	public void setCustomerSolution(CustomerSolution customerSolution) {
		this.customerSolution = customerSolution;
	}

	public SolutionFaceProductMix getSolutionFaceProductMix() {
		return solutionFaceProductMix;
	}

	public void setSolutionFaceProductMix(SolutionFaceProductMix solutionFaceProductMix) {
		this.solutionFaceProductMix = solutionFaceProductMix;
	}
	
	@Override
	public int hashCode() {
		return this.customerSolution.hashCode() + this.solutionFaceProductMix.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final CustomerSolutionMixPK other = (CustomerSolutionMixPK) obj;
		if (customerSolution.getId() == other.getCustomerSolution().getId() &&
				solutionFaceProductMix.getId() == other.getSolutionFaceProductMix().getId()) {
			return true;
		} 
		return false;
	}
}


